package com.xhsj.user.sms.announcement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhsj.user.sms.announcement.entity.TbEnterpriseAnnouncement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 企业公告 Mapper 接口
 * </p>
 *
 * @author suxiaolin
 * @since 2020-06-23
 */
@Mapper
public interface TbEnterpriseAnnouncementMapper extends BaseMapper<TbEnterpriseAnnouncement> {

    //分页查询企业公告list包含通过当前用户查看是否接收
    IPage<Map<String, Object>> findListByUserIdPage(@Param("page") Page page, @Param("userId") Object userId);

    //查看详情接口根据id
    List<TbEnterpriseAnnouncement> findListById(@Param("id") String id);

    IPage<TbEnterpriseAnnouncement> getListByUserId(@Param("page") Page page, @Param("userId") Object userId);

    //删除公告
    int removeById(@Param("id") String id);
}
